package com.huxb.usercenter.controller;

import com.huxb.usercenter.dao.user.UserMapper;
import com.huxb.usercenter.domain.entity.user.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author huxb
 * @date 2020/2/8 0008 下午 3:07
 */
@RequestMapping("/test")
@RestController
public class TestController {

    @Resource
    UserMapper userMapper;

    @RequestMapping
    public  String test() {
        User user = new User();
        user.setWxId("xxx");
        user.setWxNickname("xxx");
        user.setRoles("1111");
        user.setAvatarUrl("111");
        user.setCreateTime(new Date());
        user.setUpdateTime(new Date());
        user.setBonus(100);
        userMapper.insert(user);
        return "test";
    }
}
